import time
from multiprocessing import Process
def grt_request(url):
    print(f"正在请求url:{url},耗时2秒")
    time.sleep(2)
    print(f"请求完成url:{url}")
if __name__ == "__main__":
    urls = ["www1","www2","www3"]
    starttime = time.time()
    for url in urls:
        p = Process(target=grt_request,args=(url,))
        p.start()
    endtime = time.time()
    print(f"耗时:{endtime-starttime}")
